package com.zzg.author.shrio.util;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Component;
/**
 * 权限工具类
 * @author zzg
 *
 */
@Component("perms")
public class PermissionUtil {
	/**
	 * 判断是否具有指定权限
	 * @param permission
	 * @return
	 */
	public boolean hasPerm(String permission) {
		return SecurityUtils.getSubject().isPermitted(permission);
	}
}
